$OpenBSD: patch-src_task_asm_S,v 1.3 2013/03/21 22:23:40 sthen Exp $

use movw with (16-bit) segment registers.

--- src/task/asm.S.orig	Thu Mar 21 16:21:22 2013
+++ src/task/asm.S	Thu Mar 21 16:21:35 2013
@@ -45,10 +45,10 @@
 SET:
     movl    4(%esp), %eax
 
-    movl    8(%eax), %fs
-    movl    12(%eax), %es
-    movl    16(%eax), %ds
-    movl    76(%eax), %ss
+    movw    8(%eax), %fs
+    movw    12(%eax), %es
+    movw    16(%eax), %ds
+    movw    76(%eax), %ss
     movl    20(%eax), %edi
     movl    24(%eax), %esi
     movl    28(%eax), %ebp
@@ -65,10 +65,10 @@ SET:
 GET:
     movl    4(%esp), %eax
 
-    movl    %fs, 8(%eax)
-    movl    %es, 12(%eax)
-    movl    %ds, 16(%eax)
-    movl    %ss, 76(%eax)
+    movw    %fs, 8(%eax)
+    movw    %es, 12(%eax)
+    movw    %ds, 16(%eax)
+    movw    %ss, 76(%eax)
     movl    %edi, 20(%eax)
     movl    %esi, 24(%eax)
     movl    %ebp, 28(%eax)
